<!doctype html>
<html lang="ko">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width,initial-scale=1.0,minimum-scale=1.0,maximum-scale=1.0">
<link rel="shortcut icon" type="image/x-icon" href="../assets/favicon.ico">
<title>source\jindo.Formatter.js - Jindo Component - AjaxUI@NHN</title>
<link rel="stylesheet" type="text/css" href="../assets/prettify/prettify-min.css" media="screen">
<script type="text/javascript">
	var isMobile = (function() {
		var r = window.devicePixelRatio || 1;
		if (/windows phone/i.test(navigator.userAgent)) { r = 2; }
		
		var s = Math.max(screen.width / r, screen.height / r);
		
		var m = s < 1024;
		var href = m ? "api.mobile.css" : "api.css";
		document.write('<link rel="stylesheet" type="text/css" href="../assets/' + href + '" media="screen">');
		
		return m;
	})();
</script>

<script type="text/javascript" src="../assets/jindo.desktop.min.js"></script>
<script type="text/javascript" src="../assets/jindo_component.min.js"></script>
</head>
<body class="api-page">
<div id="wrap" class="api-main"><!-- 2Depth 접기 : lft_fold 추가 -->

	<div id="header">
		<h1><a href="../index.html"><span class="blind">JindoJS</span></a></h1>
		<div class="info">
			<span class="version">version 1.6.0</span>
			<span class="bar">|</span>
			<span class="help"><span class="ic_help"></span><a href="http://devcode.nhncorp.com/projects/jindo-component/issue" target="_blank">버그신고/문의</a></span>
		</div>
		<div class="menu">
			<button type="button" id="toggle_search_btn" class="btn_sch"><span class="blind">검색</span></button>
			<button type="button" id="toggle_list_btn" class="btn_snb btn_snb_on"><span class="blind">메뉴</span></button>
			<!-- [D] 클릭시 btn_sch_on,btn_snb_on 추가 -->
		</div>
	</div>

	<!-- sch_frm -->
	<div class="sch_frm hide_when_small">
		<h2 class="blind">검색</h2>
		<div class="filter">
			<input type="search" id="api-filter" placeholder="검색어를 입력하세요.">
		</div>
		<div id="search-tab" style="display:none;">
			<ul class="tabs">
			<li class="tc-tab">전체</li>
			<li class="tc-tab">키워드</li>
			<li class="tc-tab">클래스</li>
			<li class="tc-tab">메서드</li>
			<li class="tc-tab">프로퍼티</li>
			<li class="tc-tab">이벤트</li>
			</ul>
			<div class="panels">
				<ul id="api-all" class="tc-panel"></ul>
				<ul id="api-keywords" class="tc-panel"></ul>
				<ul id="api-classes" class="tc-panel"></ul>
				<ul id="api-methods" class="tc-panel"></ul>
				<ul id="api-attrs" class="tc-panel"></ul>
				<ul id="api-events" class="tc-panel"></ul>
			</div>

		</div>
	</div>
	<!-- // sch_frm -->

	<!-- container -->
	<div id="container">
		<!-- left-columns -->
		<div id="left-columns" class="sidemenu has_scrollbar">
			<h2 class="blind"><a href="../index.html"><span>APIs</span></a></h2>
<div class="snb depth1 scrollbar hide_when_small">
	<!-- [D] style="width:135px; height:384px; -->
	<div class="scrollbar-box">
		<div class="scrollbar-content">
			<div><ul>
			            <li class="">
			            	<a href="../classes/jindo.Accordion.html" class="">
			                	Accordion
								
								

							    
						        
			            	</a>
			            </li>
			        
			            <li class="">
			            	<a href="../classes/jindo.AjaxHistory.html" class="">
			                	AjaxHistory
								
								

							    
						        
			            	</a>
			            </li>
			        
			            <li class="">
			            	<a href="../classes/jindo.BrowseButton.html" class="">
			                	BrowseButton
								
								

							    
						        
			            	</a>
			            </li>
			        
			            <li class="">
			            	<a href="../classes/jindo.Cache.html" class="">
			                	Cache
								
								

							    
						        
			            	</a>
			            </li>
			        
			            <li class="">
			            	<a href="../classes/jindo.Calendar.html" class="">
			                	Calendar
								
								

							    
						        
			            	</a>
			            </li>
			        
			            <li class="">
			            	<a href="../classes/jindo.Canvas.html" class="">
			                	Canvas
								
								

							    
						        
			            	</a>
			            </li>
			        
			            <li class="">
			            	<a href="../classes/jindo.CheckBox.html" class="">
			                	CheckBox
								
								

							    
						        
			            	</a>
			            </li>
			        
			            <li class="">
			            	<a href="../classes/jindo.CircularRolling.html" class="">
			                	CircularRolling
								
								

							    
						        
			            	</a>
			            </li>
			        
			            <li class="">
			            	<a href="../classes/jindo.Clipboard.html" class="">
			                	Clipboard
								
								

							    
						        
			            	</a>
			            </li>
			        
			            <li class="">
			            	<a href="../classes/jindo.Component.html" class="">
			                	Component
								
								

							    
						        
			            	</a>
			            </li>
			        
			            <li class="">
			            	<a href="../classes/jindo.DataBridge.html" class="">
			                	DataBridge
								
								

							    
						        
			            	</a>
			            </li>
			        
			            <li class="">
			            	<a href="../classes/jindo.DatePicker.html" class="">
			                	DatePicker
								
								

							    
						        
			            	</a>
			            </li>
			        
			            <li class="">
			            	<a href="../classes/jindo.DefaultTextValue.html" class="">
			                	DefaultTextValue
								
								

							    
						        
			            	</a>
			            </li>
			        
			            <li class="">
			            	<a href="../classes/jindo.Dialog.html" class="">
			                	Dialog
								
								

							    
						        
			            	</a>
			            </li>
			        
			            <li class="">
			            	<a href="../classes/jindo.DragArea.html" class="">
			                	DragArea
								
								

							    
						        
			            	</a>
			            </li>
			        
			            <li class="">
			            	<a href="../classes/jindo.DropArea.html" class="">
			                	DropArea
								
								

							    
						        
			            	</a>
			            </li>
			        
			            <li class="">
			            	<a href="../classes/jindo.DynamicTree.html" class="">
			                	DynamicTree
								
								

							    
						        
			            	</a>
			            </li>
			        
			            <li class="">
			            	<a href="../classes/jindo.Effect.html" class="">
			                	Effect
								
								

							    
						        
						            <span class="flag static" title="static"><span class="blind">static</span></span>
						        
			            	</a>
			            </li>
			        
			            <li class="">
			            	<a href="../classes/jindo.FileUploader.html" class="">
			                	FileUploader
								
								

							    
						        
			            	</a>
			            </li>
			        
			            <li class="">
			            	<a href="../classes/jindo.FloatingLayer.html" class="">
			                	FloatingLayer
								
								

							    
						        
			            	</a>
			            </li>
			        
			            <li class="">
			            	<a href="../classes/jindo.Foggy.html" class="">
			                	Foggy
								
								

							    
						        
			            	</a>
			            </li>
			        
			            <li class="">
			            	<a href="../classes/jindo.Formatter.html" class="">
			                	Formatter
								
								

							    
						        
			            	</a>
			            </li>
			        
			            <li class="">
			            	<a href="../classes/jindo.HTMLComponent.html" class="">
			                	HTMLComponent
								
								

							    
						        
			            	</a>
			            </li>
			        
			            <li class="">
			            	<a href="../classes/jindo.InlineTextEdit.html" class="">
			                	InlineTextEdit
								
								

							    
						        
			            	</a>
			            </li>
			        
			            <li class="">
			            	<a href="../classes/jindo.LayerEffect.html" class="">
			                	LayerEffect
								
								

							    
						        
			            	</a>
			            </li>
			        
			            <li class="">
			            	<a href="../classes/jindo.LayerManager.html" class="">
			                	LayerManager
								
								

							    
						        
			            	</a>
			            </li>
			        
			            <li class="">
			            	<a href="../classes/jindo.LayerPosition.html" class="">
			                	LayerPosition
								
								

							    
						        
			            	</a>
			            </li>
			        
			            <li class="">
			            	<a href="../classes/jindo.LazyLoading.html" class="">
			                	LazyLoading
								
								

							    
						        
						            <span class="flag static" title="static"><span class="blind">static</span></span>
						        
			            	</a>
			            </li>
			        
			            <li class="">
			            	<a href="../classes/jindo.ModalDialog.html" class="">
			                	ModalDialog
								
								

							    
						        
			            	</a>
			            </li>
			        
			            <li class="">
			            	<a href="../classes/jindo.MouseGesture.html" class="">
			                	MouseGesture
								
								

							    
						        
			            	</a>
			            </li>
			        
			            <li class="">
			            	<a href="../classes/jindo.MultipleAjaxRequest.html" class="">
			                	MultipleAjaxRequest
								
								

							    
						        
			            	</a>
			            </li>
			        
			            <li class="">
			            	<a href="../classes/jindo.NumberFormatter.html" class="">
			                	NumberFormatter
								
								

							    
						        
			            	</a>
			            </li>
			        
			            <li class="">
			            	<a href="../classes/jindo.NumericStepper.html" class="">
			                	NumericStepper
								
								

							    
						        
			            	</a>
			            </li>
			        
			            <li class="">
			            	<a href="../classes/jindo.Pagination.html" class="">
			                	Pagination
								
								

							    
						        
			            	</a>
			            </li>
			        
			            <li class="">
			            	<a href="../classes/jindo.Rolling.html" class="">
			                	Rolling
								
								

							    
						        
			            	</a>
			            </li>
			        
			            <li class="">
			            	<a href="../classes/jindo.RollingChart.html" class="">
			                	RollingChart
								
								

							    
						        
			            	</a>
			            </li>
			        
			            <li class="">
			            	<a href="../classes/jindo.RolloverArea.html" class="">
			                	RolloverArea
								
								

							    
						        
			            	</a>
			            </li>
			        
			            <li class="">
			            	<a href="../classes/jindo.RolloverClick.html" class="">
			                	RolloverClick
								
								

							    
						        
			            	</a>
			            </li>
			        
			            <li class="">
			            	<a href="../classes/jindo.ScrollBar.html" class="">
			                	ScrollBar
								
								

							    
						        
			            	</a>
			            </li>
			        
			            <li class="">
			            	<a href="../classes/jindo.ScrollBox.html" class="">
			                	ScrollBox
								
								

							    
						        
			            	</a>
			            </li>
			        
			            <li class="">
			            	<a href="../classes/jindo.SelectArea.html" class="">
			                	SelectArea
								
								

							    
						        
			            	</a>
			            </li>
			        
			            <li class="">
			            	<a href="../classes/jindo.SelectBox.html" class="">
			                	SelectBox
								
								

							    
						        
			            	</a>
			            </li>
			        
			            <li class="">
			            	<a href="../classes/jindo.Slider.html" class="">
			                	Slider
								
								

							    
						        
			            	</a>
			            </li>
			        
			            <li class="">
			            	<a href="../classes/jindo.StarRating.html" class="">
			                	StarRating
								
								

							    
						        
			            	</a>
			            </li>
			        
			            <li class="">
			            	<a href="../classes/jindo.TabControl.html" class="">
			                	TabControl
								
								

							    
						        
			            	</a>
			            </li>
			        
			            <li class="">
			            	<a href="../classes/jindo.TextRange.html" class="">
			                	TextRange
								
								

							    
						        
			            	</a>
			            </li>
			        
			            <li class="">
			            	<a href="../classes/jindo.Timer.html" class="">
			                	Timer
								
								

							    
						        
			            	</a>
			            </li>
			        
			            <li class="">
			            	<a href="../classes/jindo.Transition.html" class="">
			                	Transition
								
								

							    
						        
			            	</a>
			            </li>
			        
			            <li class="">
			            	<a href="../classes/jindo.Tree.html" class="">
			                	Tree
								
								

							    
						        
			            	</a>
			            </li>
			        
			            <li class="">
			            	<a href="../classes/jindo.UIComponent.html" class="">
			                	UIComponent
								
								

							    
						        
			            	</a>
			            </li>
			        
			            <li class="">
			            	<a href="../classes/jindo.UploadQueue.html" class="">
			                	UploadQueue
								
								

							    
						        
			            	</a>
			            </li>
			        
			            <li class="">
			            	<a href="../classes/jindo.WatchInput.html" class="">
			                	WatchInput
								
								

							    
						        
			            	</a>
			            </li>
			        </ul></div>
		</div>
	</div>
	<div class="scrollbar-v">
		<div class="scrollbar-button-up"></div>
		<div class="scrollbar-track">
			<div class="scrollbar-thumb" style="top: 0px; height: 222px; "></div>
		</div>
		<div class="scrollbar-button-down"></div>
	</div>
</div>


<button type="button" title="펼치기" class="btn_open">바로가기 열기<span class="ic"></span></button>
<button type="button" title="접기" class="btn_close">바로가기 닫기<span class="ic"></span></button>

		</div>
		<!-- // left-columns -->

		<!-- main content -->
		<div id="main">
			<div class="main_fix">
				<div class="content">
	
	<h1 class="blind">source/jindo.Formatter.js</h1>
	<div class="tc-panel first">
		<dl class="relation">
			<dt>파일명</dt>
			<dd>jindo.Formatter.js</dd>
			<dt>경로</dt>
			<dd>source/</dd>
		</dl>
		<div id="file" class="file">
		    <pre class="code prettyprint linenums">/**
	@fileOverview&nbsp;Text&nbsp;Input의&nbsp;값을&nbsp;특정한&nbsp;형식으로&nbsp;변환하는&nbsp;컴포넌트
	@author&nbsp;hooriza,&nbsp;modified&nbsp;by&nbsp;senxation
	@version&nbsp;#__VERSION__#
**/
/**
	Text&nbsp;Input의&nbsp;값을&nbsp;특정한&nbsp;형식으로&nbsp;변환하는&nbsp;컴포넌트
	Formatter&nbsp;컴포넌트는&nbsp;입력&nbsp;컨트롤&nbsp;(input[type=text],&nbsp;textarea)의&nbsp;값을&nbsp;특정한&nbsp;형식으로&nbsp;변환한다.
	
	@class&nbsp;jindo.Formatter
	@extends&nbsp;jindo.UIComponent
	@uses&nbsp;jindo.TextRange
	@uses&nbsp;jindo.WatchInput
	
	@keyword&nbsp;formatter,&nbsp;포맷터,&nbsp;input,&nbsp;text,&nbsp;형식
**/
jindo.Formatter&nbsp;=&nbsp;jindo.$Class({
	/**&nbsp;@lends&nbsp;jindo.Formatter.prototype&nbsp;*/
	
	_aMarks&nbsp;:&nbsp;[&nbsp;&#39;\u0000&#39;,&nbsp;&#39;\uFFFF&#39;&nbsp;],
	
	_sPrevValue&nbsp;:&nbsp;null,
	_oTextRange&nbsp;:&nbsp;null,
	_bFakeFocus&nbsp;:&nbsp;false,
	
	/**
		Formatter&nbsp;컴포넌트를&nbsp;생성한다.
		@constructor
		@param&nbsp;{HTMLElement}&nbsp;el&nbsp;컴포넌트를&nbsp;적용할&nbsp;엘리먼트
		@param&nbsp;{Object}&nbsp;[htOption]&nbsp;옵션&nbsp;객체
			@param&nbsp;{Boolean}&nbsp;[htOption.bPaintOnload=true]&nbsp;로드시에&nbsp;paint()&nbsp;수행여부
			@param&nbsp;{Boolean}&nbsp;[htOption.bActivateOnload=true]&nbsp;로드시에&nbsp;activate()&nbsp;수행여부
			@param&nbsp;{Object}&nbsp;[htOption.WatchInput]&nbsp;WatchInput에&nbsp;적용될&nbsp;옵션
				@param&nbsp;{Number}&nbsp;[htOption.WatchInput.nInterval=100]&nbsp;Check할&nbsp;간격&nbsp;(Except&nbsp;IE)
				@param&nbsp;{Boolean}&nbsp;[htOption.WatchInput.bPermanent=true]&nbsp;focus/blur와&nbsp;상관없이&nbsp;항상&nbsp;동작하도록&nbsp;설정
				@param&nbsp;{Boolean}&nbsp;[htOption.WatchInput.bActivateOnload=false]&nbsp;로드시에&nbsp;activate()&nbsp;수행여부.&nbsp;시작&nbsp;시점은&nbsp;직접&nbsp;지정
		@example&nbsp;
			var&nbsp;oFormatter&nbsp;=&nbsp;new&nbsp;jindo.Formatter(jindo.$(&#39;foo&#39;),&nbsp;{
				bPaintOnload&nbsp;:&nbsp;true,&nbsp;//로드시에&nbsp;paint()&nbsp;수행여부
				bActivateOnload&nbsp;:&nbsp;true,&nbsp;//로드시에&nbsp;activate()&nbsp;수행여부
				WatchInput&nbsp;:&nbsp;{&nbsp;//WatchInput에&nbsp;적용될&nbsp;옵션
					nInterval&nbsp;:&nbsp;100,&nbsp;//Check할&nbsp;간격&nbsp;(Except&nbsp;IE)
					bPermanent&nbsp;:&nbsp;true,&nbsp;//focus/blur와&nbsp;상관없이&nbsp;항상&nbsp;동작하도록&nbsp;설정
					bActivateOnload&nbsp;:&nbsp;false&nbsp;//로드시에&nbsp;activate()&nbsp;수행여부.&nbsp;시작&nbsp;시점은&nbsp;직접&nbsp;지정
				}&nbsp;
			}).attach({
				focus&nbsp;:&nbsp;function(oCustomEvent)&nbsp;{
					//입력&nbsp;컨트롤에&nbsp;focus되었을&nbsp;때&nbsp;발생
					//전달되는&nbsp;이벤트&nbsp;객체&nbsp;oCustomEvent&nbsp;=&nbsp;{
					//	elInput&nbsp;:&nbsp;(HTMLElement)&nbsp;입력&nbsp;컨트롤&nbsp;엘리먼트
					//}
				},
				beforeChange&nbsp;:&nbsp;function(oCustomEvent)&nbsp;{
					//입력된&nbsp;값이&nbsp;정해진&nbsp;형식으로&nbsp;변경되기&nbsp;전에&nbsp;발생&nbsp;
					//전달되는&nbsp;이벤트&nbsp;객체&nbsp;oCustomEvent&nbsp;=&nbsp;{
					//	elInput&nbsp;:&nbsp;(HTMLElement)&nbsp;입력&nbsp;컨트롤&nbsp;엘리먼트
					//	sText&nbsp;:&nbsp;(String)&nbsp;입력&nbsp;컨트롤의&nbsp;값
					//	sStartMark&nbsp;:&nbsp;(String)&nbsp;캐럿의&nbsp;시작위치를&nbsp;계산하기&nbsp;위한&nbsp;임시&nbsp;문자&nbsp;&nbsp;
					//	sEndMark&nbsp;:&nbsp;(String)&nbsp;캐럿의&nbsp;마지막위치를&nbsp;계산하기&nbsp;위한&nbsp;임시&nbsp;문자
					//}&nbsp;
				},
				change&nbsp;:&nbsp;function(oCustomEvent)&nbsp;{
					//입력된&nbsp;값이&nbsp;정해진&nbsp;형식으로&nbsp;변경된&nbsp;후&nbsp;발생
					//전달되는&nbsp;이벤트&nbsp;객체&nbsp;oCustomEvent&nbsp;=&nbsp;{
					//	elInput&nbsp;:&nbsp;(HTMLElement)&nbsp;입력&nbsp;컨트롤&nbsp;엘리먼트
					//}
				},
				blur&nbsp;:&nbsp;function(oCustomEvent)&nbsp;{
					//입력&nbsp;컨트롤이&nbsp;blur되었을&nbsp;때&nbsp;발생
					//전달되는&nbsp;이벤트&nbsp;객체&nbsp;oCustomEvent&nbsp;=&nbsp;{
					//	elInput&nbsp;:&nbsp;(HTMLElement)&nbsp;입력&nbsp;컨트롤&nbsp;엘리먼트
					//}
				}
			});
	**/
	$init&nbsp;:&nbsp;function(el,&nbsp;htOption)&nbsp;{
		this._el&nbsp;=&nbsp;jindo.$(el);
		this.option({
			bPaintOnload&nbsp;:&nbsp;true,&nbsp;//로드시에&nbsp;paint()&nbsp;수행여부
			bActivateOnload&nbsp;:&nbsp;true,&nbsp;//로드시에&nbsp;activate()&nbsp;수행여부
			WatchInput&nbsp;:&nbsp;{&nbsp;//WatchInput에&nbsp;적용될&nbsp;옵션
				nInterval&nbsp;:&nbsp;100,&nbsp;//Check할&nbsp;간격&nbsp;(Except&nbsp;IE)
				bPermanent&nbsp;:&nbsp;true,&nbsp;//focus/blur와&nbsp;상관없이&nbsp;항상&nbsp;동작하도록&nbsp;설정
				bActivateOnload&nbsp;:&nbsp;false&nbsp;//로드시에&nbsp;activate()&nbsp;수행여부.&nbsp;시작&nbsp;시점은&nbsp;직접&nbsp;지정
			}&nbsp;
		});
		this.option(htOption&nbsp;||&nbsp;{});
		this.isOpera&nbsp;=&nbsp;jindo.$Agent().navigator.opera;
		
		var&nbsp;self&nbsp;=&nbsp;this;
		this._wfRealBlur&nbsp;=&nbsp;jindo.$Fn(this._realBlur,&nbsp;this);
		this._wfRealFocus&nbsp;=&nbsp;jindo.$Fn(this._realFocus,&nbsp;this);
		this._oTextRange&nbsp;=&nbsp;new&nbsp;jindo.TextRange(el);
		this._oWatchInput&nbsp;=&nbsp;new&nbsp;jindo.WatchInput(el,&nbsp;this.option(&quot;WatchInput&quot;)).attach({
			change&nbsp;:&nbsp;function(oCustomEvent)&nbsp;{
				//change이벤트&nbsp;발생후에는&nbsp;항상&nbsp;setCompareValue가&nbsp;실행되므로&nbsp;setTimeout으로&nbsp;우회
				setTimeout(function()&nbsp;{&nbsp;
					self.paint();&nbsp;
				},&nbsp;1);
			}
		});
		
		if&nbsp;(this.option(&quot;bPaintOnload&quot;))&nbsp;{
			setTimeout(function()&nbsp;{&nbsp;
				self.paint();&nbsp;
			},&nbsp;1);
		}
		if&nbsp;(this.option(&quot;bActivateOnload&quot;))&nbsp;{
			this.activate();		
		}
	},
	
	/**
		사용된&nbsp;jindo.WatchInput&nbsp;컴포넌트의&nbsp;인스턴스를&nbsp;리턴한다.
		
		@method&nbsp;getWatchInput
		@return&nbsp;{jindo.WatchInput}
	**/
	getWatchInput&nbsp;:&nbsp;function()&nbsp;{
		return&nbsp;this._oWatchInput;
	},
	
	_splice&nbsp;:&nbsp;function(sStr,&nbsp;nIndex,&nbsp;nHowMany,&nbsp;sInsert)&nbsp;{
		return&nbsp;sStr.slice(0,&nbsp;nIndex)&nbsp;+&nbsp;sInsert&nbsp;+&nbsp;sStr.slice(nIndex&nbsp;+&nbsp;nHowMany);
	},
	
	/**
		Text&nbsp;Input의&nbsp;값을&nbsp;설정한다.
		&nbsp;값이&nbsp;설정된&nbsp;후&nbsp;paint()가&nbsp;수행되며&nbsp;정해진&nbsp;형식으로&nbsp;변환된다.
		
		@method&nbsp;setValue
		@param&nbsp;{String}&nbsp;s&nbsp;Text&nbsp;Input의&nbsp;값
		@return&nbsp;{this}
	**/
	setValue&nbsp;:&nbsp;function(s)&nbsp;{
		this._el.value&nbsp;=&nbsp;s;
		this.paint();
		return&nbsp;this;
	},
	
	/**
		Formatter&nbsp;컴포넌트를&nbsp;수행한다.
		Text&nbsp;Input에&nbsp;입력이&nbsp;있는&nbsp;경우&nbsp;beforeChange&nbsp;이벤트&nbsp;발생.&nbsp;값이&nbsp;바뀌었을때&nbsp;change&nbsp;이벤트가&nbsp;발생한다.
		
		@method&nbsp;paint
		@return&nbsp;{this}&nbsp;
	**/
	paint&nbsp;:&nbsp;function()&nbsp;{
		var&nbsp;el&nbsp;=&nbsp;this._el,
			oTextRange&nbsp;=&nbsp;this._oTextRange,
			aMark&nbsp;=&nbsp;this._aMarks,
			sText&nbsp;=&nbsp;el.value.toString(),
			bFocus&nbsp;=&nbsp;oTextRange.hasFocus(),
			aSel,
			htParam;
		
		if&nbsp;(bFocus)&nbsp;{
			aSel&nbsp;=&nbsp;[&nbsp;-1,&nbsp;-1&nbsp;];
			try&nbsp;{&nbsp;
				aSel&nbsp;=&nbsp;oTextRange.getSelection();
			}&nbsp;catch(e)&nbsp;{&nbsp;}
			
			sText&nbsp;=&nbsp;this._splice(this._splice(sText,&nbsp;aSel[1],&nbsp;0,&nbsp;aMark[1]),&nbsp;aSel[0],&nbsp;0,&nbsp;aMark[0]);
		}
		
		htParam&nbsp;=&nbsp;{&nbsp;
			elInput&nbsp;:&nbsp;el,&nbsp;
			sText&nbsp;:&nbsp;sText,&nbsp;
			sStartMark&nbsp;:&nbsp;aMark[0],&nbsp;
			sEndMark&nbsp;:&nbsp;aMark[1]&nbsp;
		};
		
		/**
			입력된&nbsp;값이&nbsp;정해진&nbsp;형식으로&nbsp;변경되기&nbsp;전
			
			@event&nbsp;beforeChange
			@param&nbsp;{String}&nbsp;sType&nbsp;커스텀&nbsp;이벤트명
			@param&nbsp;{HTMLElement}&nbsp;elInput&nbsp;입력&nbsp;컨트롤&nbsp;엘리먼트
			@param&nbsp;{String}&nbsp;sText&nbsp;입력&nbsp;컨트롤의&nbsp;값
			@param&nbsp;{String}&nbsp;sStartMark&nbsp;캐럿의&nbsp;시작위치를&nbsp;계산하기&nbsp;위한&nbsp;임시&nbsp;문자
			@param&nbsp;{String}&nbsp;sEndMark&nbsp;캐럿의&nbsp;마지막위치를&nbsp;계산하기&nbsp;위한&nbsp;임시&nbsp;문자
			@param&nbsp;{Function}stop&nbsp;&nbsp;수행시&nbsp;입력된&nbsp;값을&nbsp;변경하지&nbsp;않음
			@example
				//&nbsp;커스텀&nbsp;이벤트&nbsp;핸들링&nbsp;예제
				oFormatter.attach(&quot;beforeChange&quot;,&nbsp;function(oCustomEvent)&nbsp;{&nbsp;...&nbsp;});
		**/
		if&nbsp;(this.fireEvent(&#39;beforeChange&#39;,&nbsp;htParam))&nbsp;{
			var&nbsp;sOutput&nbsp;=&nbsp;htParam.sText;
			
			if&nbsp;(bFocus)&nbsp;{
				var&nbsp;nPos&nbsp;=&nbsp;sOutput.indexOf(aMark[0]);
				if&nbsp;(nPos&nbsp;&gt;&nbsp;-1)&nbsp;{
					sOutput&nbsp;=&nbsp;this._splice(sOutput,&nbsp;nPos,&nbsp;1,&nbsp;&#39;&#39;);
				}
				
				aSel&nbsp;=&nbsp;[nPos];
				aSel[1]&nbsp;=&nbsp;sOutput.indexOf(aMark[1]);
				if&nbsp;(aSel[1]&nbsp;&gt;&nbsp;-1)&nbsp;{
					sOutput&nbsp;=&nbsp;this._splice(sOutput,&nbsp;aSel[1],&nbsp;1,&nbsp;&#39;&#39;);
				}
				
				var&nbsp;self&nbsp;=&nbsp;this;
				setTimeout(function(){
					self._bFakeFocus&nbsp;=&nbsp;true;
					(!this.isOpera)||el.blur();&nbsp;//opera&nbsp;10.10의&nbsp;경우&nbsp;blur()&nbsp;focus()를&nbsp;수행해도&nbsp;focus&nbsp;먼저&nbsp;발생하기때문에&nbsp;순서대로&nbsp;수행되도록&nbsp;수정
				},&nbsp;1);
				
				setTimeout(function(){
					self._oWatchInput.setInputValue(sOutput);
					el.focus();
					try&nbsp;{
						oTextRange.setSelection(aSel[0],&nbsp;aSel[1]);
					}&nbsp;catch(e)&nbsp;{}
					/**
						입력된&nbsp;값이&nbsp;정해진&nbsp;형식으로&nbsp;변경된&nbsp;후
						
						@event&nbsp;change
						@param&nbsp;{String}&nbsp;sType&nbsp;커스텀&nbsp;이벤트명
						@param&nbsp;{HTMLElement}&nbsp;elInput&nbsp;입력&nbsp;컨트롤&nbsp;엘리먼트
						@example
							//&nbsp;커스텀&nbsp;이벤트&nbsp;핸들링&nbsp;예제
							oFormatter.attach(&quot;change&quot;,&nbsp;function(oCustomEvent)&nbsp;{&nbsp;...&nbsp;});
					**/
					self.fireEvent(&#39;change&#39;,&nbsp;{
						elInput:&nbsp;el
					});
				},&nbsp;2);
				
				setTimeout(function(){
					self._bFakeFocus&nbsp;=&nbsp;false;
				},&nbsp;20);
			}&nbsp;else&nbsp;{
				this._oWatchInput.setInputValue(sOutput);
				this.fireEvent(&#39;change&#39;,&nbsp;{
					elInput:&nbsp;el
				});
			}
		}
		
		return&nbsp;this;
	},
	
	_realBlur&nbsp;:&nbsp;function()&nbsp;{
		if&nbsp;(!this._bFakeFocus)&nbsp;{
			this.getWatchInput().stop();
			/**
				입력&nbsp;컨트롤이&nbsp;blur되었을&nbsp;때
				
				@event&nbsp;blur
				@param&nbsp;{String}&nbsp;sType&nbsp;커스텀&nbsp;이벤트명
				@param&nbsp;{HTMLElement}&nbsp;elInput&nbsp;입력&nbsp;컨트롤&nbsp;엘리먼트
				@example
					//&nbsp;커스텀&nbsp;이벤트&nbsp;핸들링&nbsp;예제
					oFormatter.attach(&quot;blur&quot;,&nbsp;function(oCustomEvent)&nbsp;{&nbsp;...&nbsp;});
			**/
			this.fireEvent(&quot;blur&quot;,&nbsp;{
				elInput&nbsp;:&nbsp;this._el
			});
		}
	},
	
	_realFocus&nbsp;:&nbsp;function()&nbsp;{
		if&nbsp;(!this._bFakeFocus)&nbsp;{
			this.getWatchInput().start(true);
			/**
				입력&nbsp;컨트롤에&nbsp;focus되었을&nbsp;때
				
				@event&nbsp;focus
				@param&nbsp;{String}&nbsp;sType&nbsp;커스텀&nbsp;이벤트명
				@param&nbsp;{HTMLElement}&nbsp;elInput&nbsp;입력&nbsp;컨트롤&nbsp;엘리먼트
				@example
					//&nbsp;커스텀&nbsp;이벤트&nbsp;핸들링&nbsp;예제
					oFormatter.attach(&quot;focus&quot;,&nbsp;function(oCustomEvent)&nbsp;{&nbsp;...&nbsp;});
			**/
			this.fireEvent(&quot;focus&quot;,&nbsp;{
				elInput&nbsp;:&nbsp;this._el
			});
		}
	},
	
	_onActivate&nbsp;:&nbsp;function()&nbsp;{
		this._wfRealBlur.attach(this._el,&nbsp;&quot;blur&quot;);
		this._wfRealFocus.attach(this._el,&nbsp;&quot;focus&quot;);
	},
	
	_onDeactivate&nbsp;:&nbsp;function()&nbsp;{
		this._wfRealBlur.detach(this._el,&nbsp;&quot;blur&quot;);
		this._wfRealFocus.detach(this._el,&nbsp;&quot;focus&quot;);
	}
}).extend(jindo.UIComponent);</pre>
		</div>
	</div>
</div>

			</div>
		</div>
		<!-- // main content -->

	</div>
	<!-- // container -->

	<!-- footer -->
	<div id="footer">
		<p>Copyright ©<a href="http://nhncorp.com/" target="_blank">NHN Corp.</a> Platform Ajax Team. All Rights Reserved.</p>
	</div>
	<!-- // footer -->

</div>
<!-- // wrap -->

<style type="text/css">

	.item {
		transition:background .2s linear;
		-webkit-transition:background .2s linear;
		-moz-transition:background .2s linear;
		-o-transition:background .2s linear;
		-ms-transition:background .2s linear;
	}
	
	.highlight {
		background-color:#ffffd8 !important;
	}
	
	li.selected a.highlight {
		background-color:#aa8 !important;
	}
	
	.hide-deprecated .deprecated-item, .hide-inherited .inherited-item, .private {
		display:none;
	}
	
	.scrollbar-v, .scrollbar-h { display:none; }
	.scrollbar-show { display:block; }
	
	.api-page .tbl_fold .more_history { display:none; }
	
	/* FILE */
	.file pre.code {
		border:1px solid #ccc;
		padding:0;
	}
	
	.file ol {
		padding-left: 4em;
		background-color: #f9f9f9;
	}

	.file ol li {
		list-style: decimal;
		border-left:1px solid #ccc;
		padding:2px 4px;
	}
	
	.file li.L1, .file li.L3, .file li.L5, .file li.L7, .file li.L9 {
		background-color: #f9f9f9;	
	}

	.file li.L0, .file li.L2, .file li.L4, .file li.L6, .file li.L8 { 
		background-color: #f0f0f0;
	}
	
</style>
<script type="text/javascript" src="../assets/prettify/prettify-min.js"></script>
<script type="text/javascript" src="../assets/hash.js"></script>
<script type="text/javascript" src="../assets/api-list.js"></script>
<script type="text/javascript" src="../assets/api-search.js"></script>
<script type="text/javascript" src="../assets/../api.js?callback=APISearch.setData"></script>
<script type="text/javascript">
	var projectRoot = "../";
	var projectAssets = "../assets";
	
    apiDocs(projectAssets);	
</script>
</body>
</html>